package com.ruoyi.erp.mapper;

import com.ruoyi.erp.domain.XzgOrderProduct;
import com.ruoyi.erp.domain.XzgProduct;
import com.ruoyi.erp.domain.dto.XzgOrderProductDto;
import com.ruoyi.erp.domain.vo.XzgOrderProductVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface XzgOrderProductMapper {
    int deleteByPrimaryKey(Long orderProductId);

    int insert(XzgOrderProduct record);

    int insertSelective(XzgOrderProduct record);

    XzgOrderProduct selectByPrimaryKey(Long orderProductId);

    int updateByPrimaryKeySelective(XzgOrderProduct record);

    int updateByPrimaryKey(XzgOrderProduct record);

    int selectByOrderIdAndProductId(@Param("orderId") Long orderId, @Param("productId") Long productId);

    List<XzgOrderProductVo> selectOrderProductList(XzgOrderProductDto dto);

    XzgOrderProductVo selectByOrderProductId(Long orderProductId);

    int logicDeleteOrderProductById(@Param("orderProductIds") Long[] orderProductIds, @Param("username") String username);

    List<XzgOrderProduct> selectByOrderIds(Long[] orderIds);

    int logicDeleteByOrderIds(@Param("orderIds") Long[] orderIds, @Param("username") String username);

    List<XzgOrderProduct> selectByIds(Long[] orderProductIds);

    XzgOrderProduct selectByProductId(@Param("orderId") Long orderId, @Param("productId") Long productId);
}